<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <js file="__PUBLIC__/Js/jquery-1.7.2.min.js"/>
    <js file="__PUBLIC__/Js/ghulam.js"/>
</head>
<body >
<div class="container-fluid" >
    <div class="row">
        <div class="col-sm-9  " style="width: 100%">
            <h3 class="sub-header">角色列表</h3>
            <a href="{:U(GROUP_NAME.'/Rbac/addRole')}" class="btn btn-primary">添加角色</a>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>名称</th>
                        <th>注释</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="role" item="v">
                        <tr>
                            <td>{$v.id}</td>
                            <td>{$v.name}</td>
                            <td>{$v.remark}</td>
                            <td>
                                <if condition="$v['status']"><span class="label label-primary">正常<else/><span class="label label-danger">关闭</span></if>
                            </td>
                            <td>
                                <div class="btn-group">
                                    <a href="{:U(GROUP_NAME.'/Rbac/access', array('rid' => $v['id']))}" class="btn button-royal btn-xs">配置</a>
                                    <if condition="$v['status']">
                                        <a href="{:U(GROUP_NAME.'/Rbac/on_off_role', array('rid' => $v['id'],'status'=>1))}" class="btn btn-default btn-xs">关闭</a>
                                        <else/>

                                    <a href="{:U(GROUP_NAME.'/Rbac/on_off_role', array('rid' => $v['id'],'status'=>0))}" class="btn button-primary btn-xs">开启</a>
                                    </if>

                                    <a onclick="return del()" href="{:U(GROUP_NAME.'/Rbac/deleterole', array('rid' => $v['id']))}" class="btn btn-danger btn-xs">删除</a>
                                </div>
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>


<link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/bootstrap/css/button.css" rel="stylesheet">
<script src="__PUBLIC__/bootstrap/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/bootstrap/js/bootstrap.js"></script>
</body>
</html>